<!--专业技能组件-->
<template>
  <div class="clearfix skill-item" style="margin-bottom: 10px" @mouseover="showinfo=true" @mouseout="showinfo=false">
    <div class="triangle-right fl" :class="{triangledown:showinfo}"></div>
    <h3 class="fl" style="margin:2px;padding: 0">
      <slot name="skititle"></slot>
    </h3>
    <!--气泡框-->
    <div class="skill-info" v-show="showinfo">
      <div class="tag">
        <em></em>
        <span class="arr"></span>
        <slot name="skiinfo"></slot>
      </div>
    </div>
  </div>
</template>

<script>
  export default{
    name: 'skiitem',
    data:function () {
      return{
          showinfo:false
      }
    }
  }
</script>

<style>
  .triangle-right {
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 20px solid indigo;
    transition: all ease-in-out .5s;
    margin-right: 10px;
  }

  .triangledown {
    transform: rotateZ(90deg)!important;
  }

  .skill-item {
    position: relative;
    padding: 5px;
    cursor: pointer;
  }

  .skill-info {
    position: absolute;
    top: 35px;
  }

  .tag {
    width: 340px;
    min-height: 50px;
    border: 2px solid indigo;
    position: relative;
    margin-left: 30px;
    background-color: #FFF;
    z-index: 2;
  }

  .tag em {
    display: block;
    top: -20px;
    left: 30px;
    position: absolute;
    border: 10px solid;
    border-color: transparent transparent indigo transparent;
  }

  .tag .arr {
    display: block;
    top: -18px;
    left: 30px;
    position: absolute;
    border: 10px solid;
    border-color: transparent transparent #fff transparent;

  }
  .tag p{
    padding: 2px;
    margin: 0;
  }
</style>
